<select name="parent_id">
<option value="0">ROOT</option>
<?foreach($menus as $m){?>
<option value="<?=h($m->id)?>" <?if(isset($parent_id) && $parent_id==$m->id){echo 'selected';}?>>ROOT > <?=h($m->name)?></option>
<?}?>
</select>

